package com.czk.pojo;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import lombok.ToString;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/8/2 15:26
 */
@ToString
@XStreamAlias("xml")
public class NewsMessage extends BaseMessage {
    @XStreamAlias("ArticleCount")
    private String articleCount;
    @XStreamAlias("Articles")
    private List<Article> articles=new ArrayList<>(10);

    public NewsMessage(Map<String, String> map, String articleCount, List<Article> articles) {
        super(map);
        this.articleCount = articleCount;
        this.articles = articles;
        this.setMsgType("news");
    }

    public NewsMessage(Map<String, String> map) {
        super(map);
    }

    public String getArticleCount() {
        return articleCount;
    }

    public void setArticleCount(String articleCount) {
        this.articleCount = articleCount;
    }

    public List<Article> getArticles() {
        return articles;
    }

    public void setArticles(List<Article> articles) {
        this.articles = articles;
    }
}
